package com.database;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import com.database.DataCon;

public class DataUpdate {
	
	
	public DataUpdate(){}
	
    String tableName="userInfo";
	String sqlstr;
    Connection con=null;
	Statement stmt2=null;
	ResultSet rs=null;
	DataCon dt = new DataCon();
	
	public void DataUpdate(int state) throws SQLException{
		con = dt.DbConn();
		stmt2 = con.createStatement();  
		sqlstr =  "update "+ tableName + " set usrSelect = "+ state ;
		System.out.println(sqlstr);
		stmt2.executeUpdate(sqlstr);
	}

}
